/*
 * Structures, Classes, Unions, Enumerations
 */
// Structures

#include <iostream>

constexpr int READ_TIMES = 3;

struct Vector {
    int sz;
    double* elem;
};

void vector_init(Vector& v, int s) {
    v.elem = new double[s];
    v.sz = s;
}

double read_and_sum(int s) {
    Vector v;
    vector_init(v, s);
    for (int i = 0; i != s; i++) std::cin >> v.elem[i];
    double sum = 0;
    for (int i = 0; i != s; i++) sum += v.elem[i];
    return sum;
}

// use `.` (dot) to access struct members through a name (and through a
// reference), and `−>` to access struct members through a pointer.
void f(Vector v, Vector& rv, Vector* pv) {
    int i1 = v.sz;
    int i2 = rv.sz;
    int i3 = pv->sz;
}

int main() {
    auto s = read_and_sum(READ_TIMES);
    std::cout << s << std::endl;
    return 0;
}
